home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Mathematics / Notebooks / BookSamples / CalcAndMath / 2.10.HigherDeriv.ma next >
Encoding:
Text File  |  1992-08-06  |  51.4 KB  |  1,044 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; showRuler; magnification = 125; currentKernel; 
  4.     fontset = title, inactive, nohscroll, noKeepOnOnePage, preserveAspect, cellOutline, groupLikeTitle, center, M7, R65535, L1, e8,  24, "CalcMath"; ;
  5.     fontset = subtitle, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "CalcMath"; ;
  6.     fontset = subsubtitle, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "CalcMath"; ;
  7.     fontset = section, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20,  18, "CalcMath"; ;
  8.     fontset = subsection, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, blackBox, M19, R32767, B32767, L1, a15,  16, "CalcMath"; ;
  9.     fontset = subsubsection, inactive, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, whiteBox, M18, L1, a12,  14, "CalcMath"; ;
  10.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, B65535, L1,  14, "CalcMath"; ;
  11.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "CalcMath"; ;
  12.     fontset = input, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1,  12, "Courier"; ;
  13.     fontset = output, output, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5,  12, "Courier"; ;
  14.     fontset = message, inactive, preserveAspect, groupLikeOutput, M42, N23, R65535, B65535, L1,  12, "Courier"; ;
  15.     fontset = print, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  16.     fontset = info, inactive, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  17.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w248, h323, L1,  12, "Courier"; ;
  18.     fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1,  10, "Times"; ;
  19.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  20.     fontset = Left Header, nohscroll, cellOutline,  12;
  21.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  12;
  22.     fontset = Left Footer, cellOutline, blackBox,  12;
  23.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  24.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  25.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Courier"; ;
  26.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, whiteBox, M7, B65535, L1,  14, "CalcMath"; ;
  27.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, R32767, B32767, L1,  12, "Courier"; ;
  28.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, right, M7, bold, L1,  12, "CalcMath"; ;
  29.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, bold, italic, L1,  12, "CalcMath"; ;
  30.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1,  12, "CalcMath"; ;
  31.     next21StandardFontEncoding; ]
  32. :[font = title; inactive; preserveAspect; ]
  33.  
  34. Calculus&Mathematica 
  35.  
  36. :[font = subtitle; inactive; preserveAspect; ]
  37. Bill Davis, Horacio Porta and Jerry Uhl
  38. :[font = special5; inactive; preserveAspect; center; ]
  39. Technical Crew:
  40. Don Brown in California
  41. Alan DeGuzman, Justin Gallivan and David Wiltz in Illinois
  42. and
  43. Corey Mutter in Ohio
  44. :[font = special2; inactive; preserveAspect; ]
  45. ©Copyright 1992 by Addison-Wesley Publishing Company,Inc.
  46. The rights to all modifications are assigned to
  47. Addison-Wesley Publishing Company Inc.
  48. ;[s]
  49. 1:0,0;145,-1;
  50. 1:1,10,8,Courier,0,12,0,0,0;
  51. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  52. Initialization
  53. :[font = input; initialization; preserveAspect; endGroup; ]
  54. *)
  55. Off[General::spell1];
  56. Off[Plot::plnr];
  57. (*
  58. :[font = title; inactive; Cclosed; preserveAspect; startGroup; ]
  59.  
  60. Higher derivatives, splines and
  61. approximations
  62.  
  63. :[font = special1; inactive; preserveAspect; endGroup; ]
  64. PrintForm June 8,1990 Acorns out.
  65. Edited July 30,1991
  66. Filtered Oct 28, 1991 (Davis)
  67. Newest CalcAndMath Font, Columbus, December 1991
  68. ;[s]
  69. 2:0,0;84,1;132,-1;
  70. 2:1,14,10,CalcMath,0,14,0,0,65535;1,14,10,CalcMath,0,14,0,0,0;
  71. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  72. Guide
  73. :[font = text; inactive; preserveAspect; endGroup; ]
  74. The physical meaning of the higher derivatives may not be apparent to you, but their significance and utility will not be soon forgotten after this lesson.
  75. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  76. Basics
  77. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  78. B.1)  Some remarkable plots and an explanation.
  79. :[font = text; inactive; preserveAspect; ]
  80. Sometimes functions whose formulas are strikingly different have plots that are strikingly similar.
  81. :[font = subsubsection; inactive; preserveAspect; ]
  82. B.1.a.i)
  83. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  84. Plot Cos[x] and Î1ã ã-ã ãxãç on the same axes for -.5 ² x ² .5.
  85. Describe what you see.
  86. :[font = special1; inactive; preserveAspect; ]
  87. Answer:
  88. :[font = input; preserveAspect; ]
  89. Plot[{Cos[x], Sqrt[1 - x^2]},{x,-.5,.5}];
  90. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  91. Very similar plots.
  92. :[font = subsubsection; inactive; preserveAspect; ]
  93. B.1.a.ii)
  94. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  95. Plot Sin[x] and x (Cos[x])å¹è on the same axes for -1 ² x ² 1.
  96. Describe what you see.
  97. :[font = special1; inactive; preserveAspect; ]
  98. Answer:
  99. :[font = input; preserveAspect; ]
  100. Plot[{Sin[x],x Cos[x]^(1/3)},{x,-1,1}];
  101. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  102. Cohabitation.
  103. :[font = subsubsection; inactive; preserveAspect; ]
  104. B.1.a.iii)
  105. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  106. Plot Sin[x] and x (60 - 7 xç) / (60 + 3 xç) on the same axes for -3 ² x ² 3.  Describe what you see.
  107. :[font = subsubsection; inactive; preserveAspect; ]
  108. Answer:
  109. :[font = input; preserveAspect; ]
  110. Plot[{Sin[x],x ( 60 - 7 x^2)/(60 + 3 x^2)},{x,-3,3}];
  111. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  112. Sharing lots of ink.
  113. :[font = subsubsection; inactive; preserveAspect; ]
  114. B.1.b.i)
  115. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  116. Are the plotting phenomena we saw in the last four plots accidents?
  117. :[font = special1; inactive; preserveAspect; ]
  118. Answer:
  119. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  120. In mathematics, there are no accidents.
  121. :[font = subsubsection; inactive; preserveAspect; ]
  122. B.1.b.ii)
  123. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  124. What can explain what's happening?
  125. :[font = special1; inactive; preserveAspect; ]
  126. Answer:
  127. :[font = smalltext; inactive; preserveAspect; ]
  128. It has to do with the higher derivatives.  Look at:
  129. :[font = input; preserveAspect; ]
  130. Plot[{Cos[x], Sqrt[1 - x^2]},{x,-.5,.5}];
  131. :[font = smalltext; inactive; preserveAspect; ]
  132. Note that 0 is the center of the plotting interval [-.5, .5] and look at:
  133. :[font = input; preserveAspect; ]
  134. {Cos[x], Sqrt[1 - x^2]}/.x->0
  135. :[font = smalltext; inactive; preserveAspect; ]
  136. The functions match at the center of the interval.
  137. :[font = input; preserveAspect; ]
  138. {D[Cos[x],x], D[Sqrt[1 - x^2],x]}/.x->0
  139. :[font = smalltext; inactive; preserveAspect; ]
  140. Their first derivatives match at the center of the interval.
  141. :[font = input; preserveAspect; ]
  142. {D[Cos[x],{x,2}], D[Sqrt[1 - x^2],{x,2}]}/.x->0
  143. :[font = smalltext; inactive; preserveAspect; ]
  144. Their second derivatives match at the center of the interval.
  145. :[font = input; preserveAspect; ]
  146. {D[Cos[x],{x,3}], D[Sqrt[1 - x^2],{x,3}]}/.x->0
  147. :[font = smalltext; inactive; preserveAspect; ]
  148. Their third derivatives match at the center of the interval.
  149. :[font = input; preserveAspect; ]
  150. {D[Cos[x],{x,4}], D[Sqrt[1 - x^2],{x,4}]}/.x->0
  151. :[font = smalltext; inactive; preserveAspect; ]
  152. Their fourth derivatives do not match at the center of the interval.
  153. We say that these two functions have order of contact 3 at 0.
  154. Let's look at the next pair:
  155. :[font = input; preserveAspect; ]
  156. Plot[{Sin[x],x Cos[x]^(1/3)},{x,-1,1}];
  157. :[font = smalltext; inactive; preserveAspect; ]
  158. Note that 0 is the center of the plotting interval [-1,1] and look at:
  159. :[font = input; preserveAspect; ]
  160. {Sin[x],x Cos[x]^(1/3)}/.x->0
  161. :[font = input; preserveAspect; ]
  162. {D[Sin[x],x],D[x Cos[x]^(1/3),x]}/.x->0
  163. :[font = input; preserveAspect; ]
  164. {D[Sin[x],{x,2}],D[x Cos[x]^(1/3),{x,2}]}/.x->0
  165. :[font = input; preserveAspect; ]
  166. {D[Sin[x],{x,3}],D[x Cos[x]^(1/3),{x,3}]}/.x->0
  167. :[font = input; preserveAspect; ]
  168. {D[Sin[x],{x,4}],D[x Cos[x]^(1/3),{x,4}]}/.x->0
  169. :[font = input; preserveAspect; ]
  170. {D[Sin[x],{x,5}],D[x Cos[x]^(1/3),{x,5}]}/.x->0
  171. :[font = smalltext; inactive; preserveAspect; ]
  172. The functions and their first four derivatives match at 0.
  173. We say that these two functions have order of contact 4 at 0.
  174. Let's look at the last pair:
  175. :[font = input; preserveAspect; ]
  176. Plot[{Sin[x],x ( 60 - 7 x^2)/(60 + 3 x^2)},{x,-3,3}];
  177. :[font = smalltext; inactive; preserveAspect; ]
  178. Note that 0 is the center of the plotting interval [-3,3] and look at:
  179. :[font = input; preserveAspect; ]
  180. Clear[f,g,x]
  181. {f[x_] = Sin[x],g[x_] = x (60 - 7 x^2)/(60 + 3 x^2)}
  182. :[font = input; preserveAspect; ]
  183. {f[0],g[0]}
  184. :[font = input; preserveAspect; ]
  185. {f'[0], g'[0]}
  186. :[font = input; preserveAspect; ]
  187. {f''[0], g''[0]}
  188. :[font = input; preserveAspect; ]
  189. {f'''[0], g'''[0]}
  190. :[font = input; preserveAspect; ]
  191. {f''''[0], g''''[0]}
  192. :[font = input; preserveAspect; ]
  193. {f'''''[0],g'''''[0]}
  194. :[font = input; preserveAspect; ]
  195. {f''''''[0],g''''''[0]}
  196. :[font = input; preserveAspect; ]
  197. {f'''''''[0],g'''''''[0]}
  198. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ]
  199. The functions and their first six derivatives match at 0.
  200. We say that these two functions have order of contact 6 at 0.
  201. The idea of order of contact looks like it has potential.
  202. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  203. B.2)  Smooth splines.
  204. :[font = text; inactive; preserveAspect; ]
  205. A spline is a long flexible strip of plastic or the like that is used in drawing smooth curves.  Derivatives can be used for the same purpose.
  206. Suppose we have two functions f[x] and g[x] and we have a number b.  Create a new function h[x] by setting
  207.      h(x) = f[x] for x ² b 
  208. and
  209.      h[x] = g[x] for x > b.
  210. If f[b] = g[b], then we say that the new function h[x] is a spline of f[x] and g[x] knotted at {b, f[b]} = {b, g[b]}.
  211. :[font = subsubsection; inactive; preserveAspect; ]
  212. B.2.a)
  213. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  214. Plot a spline of eû and
  215.      ÎˋÒåãÒ—–ãÒ¯û + Sin[6 xè]
  216. knotted at {0,1} on an interval including 0.  Discuss reasons for the smoothness of the spline curve as it passes through the knot at {0,1}.
  217. :[font = special1; inactive; preserveAspect; ]
  218. Answer:
  219. :[font = input; preserveAspect; ]
  220. Clear[f,g,h,x]
  221. f[x_] = E^x 
  222. :[font = input; preserveAspect; ]
  223. g[x_] := Sqrt[(1 + x)/(1 - x)] + Sin[6 x^3]
  224. :[font = input; preserveAspect; ]
  225. h[x_] := g[x]/;x > 0 ; h[x_] := f[x]/;x <= 0
  226. :[font = input; preserveAspect; ]
  227. Plot[h[x],{x,-1,1}];
  228. :[font = smalltext; inactive; preserveAspect; ]
  229. To see why the spline is so smooth at the knot at {0,1}, look at:
  230. :[font = input; preserveAspect; ]
  231. {f[0],g[0]}
  232. :[font = input; preserveAspect; ]
  233. {f'[0],g'[0]}
  234. :[font = input; preserveAspect; ]
  235. {f''[0],g''[0]}
  236. :[font = input; preserveAspect; ]
  237. {f'''[0],g'''[0]}
  238. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  239. The smoothness of the spline at the knot at {0,1} seems to be related to the fact that f[x] and g[x] have order of contact 2 at {0,1}.
  240. :[font = subsubsection; inactive; preserveAspect; ]
  241. B.2.b)
  242. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  243. Plot a spline of eû and 1 - 2 xç knotted at {0,1} on an interval including 0.  Discuss reasons for the lack of smoothness of the spline curve as it passes through the knot at {0,1}.
  244. :[font = special1; inactive; preserveAspect; ]
  245. Answer:
  246. :[font = input; preserveAspect; ]
  247. Clear[f,g,h,x]
  248. f[x_] = E^x 
  249. :[font = input; preserveAspect; ]
  250. g[x_] := 1 - 2 x^2
  251. :[font = input; preserveAspect; ]
  252. h[x_] := g[x]/;x > 0 ; h[x_] := f[x]/;x <= 0
  253. :[font = input; preserveAspect; ]
  254. Plot[h[x],{x,-1,1},AxesLabel->{"x","y"}];
  255. :[font = smalltext; inactive; preserveAspect; ]
  256. To see why the spline has a hitch at the knot at {0,1}, look at:
  257. :[font = input; preserveAspect; ]
  258. {f[0],g[0]}
  259. :[font = input; preserveAspect; ]
  260. {f'[0],g'[0]}
  261. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  262. The lack of smoothness of the spline at the knot at {0,1} seems to be related to the fact that f[x] and g[x] have order of contact 0 at {0,1}.
  263. A road built in the shape of this plot would be highly unsafe.
  264. :[font = subsubsection; inactive; preserveAspect; ]
  265. B.2.c)
  266. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  267. Plot a spline of eû±å and ¥Òè + £Òû + ¢ÒûÄ + xé/24 knotted at {1,1} on an interval including 1.  Discuss reasons for the smoothness of the spline curve as it passes through the knot at {1,1}.
  268. :[font = special1; inactive; preserveAspect; ]
  269. Answer:
  270. :[font = input; preserveAspect; ]
  271. Clear[f,g,h,x]
  272. f[x_] = E^(x - 1) 
  273. :[font = input; preserveAspect; ]
  274. g[x_] = 3/8 + x/3 + x^2/4 + x^4/24 
  275. :[font = input; preserveAspect; ]
  276. h[x_] := g[x]/;x > 1 ; h[x_] := f[x]/;x <= 1
  277. :[font = input; preserveAspect; ]
  278. Plot[h[x],{x,0,2},AxesLabel->{"x","y"}];
  279. :[font = smalltext; inactive; preserveAspect; ]
  280. To see why the spline passes so smoothly through the knot at {1,1}, look at:
  281. :[font = input; preserveAspect; ]
  282. {f[1],g[1]}
  283. :[font = input; preserveAspect; ]
  284. {f'[1],g'[1]}
  285. :[font = input; preserveAspect; ]
  286. {f''[1],g''[1]}
  287. :[font = input; preserveAspect; ]
  288. {f'''[1],g'''[1]}
  289. :[font = input; preserveAspect; ]
  290. {f''''[1],g''''[1]}
  291. :[font = input; preserveAspect; ]
  292. {f'''''[1],g'''''[1]}
  293. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  294. The extreme smoothness of the spline at the knot at {1,1} seems to be related to the fact that f[x] and g[x] have order of contact 4 at {1,1}.  A road built in the shape of this plot would be very safe.
  295. :[font = subsubsection; inactive; preserveAspect; ]
  296. B.2.d)
  297. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  298. What practical good is this?
  299. :[font = special1; inactive; preserveAspect; ]
  300. Answer:
  301. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; endGroup; ]
  302. Good question.
  303. First of all, the idea of a spline smooth at its knots makes for interesting plots and nice art.  But there is a serious aspect as well.
  304. Laying out the curves on expressways and railroads amounts to joining curved plots to relatively straight plots at knots of a spline.  It is unacceptable to have a hitch (corner) in the middle of the roadway.
  305. The higher the order of contact at the knots, the safer the highway or roadbed.
  306. Any order of contact less than 2 is considered unsafe.  And this may be pushing it.
  307. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  308. Tutorial
  309. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  310. T.1)  Approximation via higher order contact.
  311. :[font = subsubsection; inactive; preserveAspect; ]
  312. T.1.a.i)
  313. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  314. Find the third degree (cubic) polynomial that has order of contact 3 with eû at {0,1}.
  315. Plot this polynomial and eû on the same axes for-2 ² x ² 2.
  316. :[font = special1; inactive; preserveAspect; ]
  317. Answer:
  318. :[font = smalltext; inactive; preserveAspect; ]
  319. The polynomial is:
  320. :[font = input; preserveAspect; ]
  321. Clear[x,y,a,b,c,d]
  322. y = a + b x + c x^2 + d x^3 
  323. :[font = smalltext; inactive; preserveAspect; ]
  324. The conditions that must be met are:
  325. :[font = input; preserveAspect; ]
  326. eqn1 = (y /.x->0) == E^x/.x->0
  327. :[font = input; preserveAspect; ]
  328. eqn2 = (D[y,x]/.x->0) == D[E^x,x]/.x->0
  329. :[font = input; preserveAspect; ]
  330. eqn3 = (D[y,{x,2}]/.x->0) == D[E^x,{x,2}]/.x->0
  331. :[font = input; preserveAspect; ]
  332. eqn4 = (D[y,{x,3}]/.x->0) == D[E^x,{x,3}]/.x->0
  333. :[font = smalltext; inactive; preserveAspect; ]
  334. Now we nail down the coefficients:
  335. :[font = input; preserveAspect; ]
  336. coeffs = Solve[{eqn1,eqn2,eqn3,eqn4}]
  337. :[font = smalltext; inactive; preserveAspect; ]
  338. Substitute in the values of the coefficients that do the job:
  339. :[font = input; preserveAspect; ]
  340. goody = y/.coeffs[[1]]
  341. :[font = smalltext; inactive; preserveAspect; ]
  342. And now the plot:
  343. :[font = input; preserveAspect; ]
  344. Plot[{E^x,goody},{x,-2,2}];
  345. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  346. There's a lot of snuggling going on for -1 ² x ² 1.
  347. :[font = subsubsection; inactive; preserveAspect; ]
  348. T.1.a.ii)
  349. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  350. If you use your answer to part i) to compute values of eû for 
  351. -1 ² x ² 1, then how many accurate decimals of eû do you get?
  352. :[font = special1; inactive; preserveAspect; ]
  353. Answer:
  354. :[font = smalltext; inactive; preserveAspect; ]
  355. Let's see how far apart they are by plotting the absolute value of their difference.  We'll use the plotting option PlotRange->All to guarantee that we see the whole plot.
  356. :[font = input; preserveAspect; ]
  357. Plot[Abs[goody - E^x],{x,-1,1},PlotRange->All];
  358. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  359. You get at least one accurate decimal of eû.
  360. :[font = subsubsection; inactive; preserveAspect; ]
  361. T.1.a.iii)
  362. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  363. If you use your answer to part i) to calculate values of eû for -¢Òå ² x ² ¢Òå, then how many accurate decimals of eû do you get?
  364. :[font = special1; inactive; preserveAspect; ]
  365. Answer:
  366. :[font = input; preserveAspect; ]
  367. Plot[Abs[goody - E^x],{x,-1/4,1/4},PlotRange->All];
  368. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  369. You get at least three accurate decimals of eû.
  370. :[font = subsubsection; inactive; preserveAspect; ]
  371. T.1.b.i)
  372. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  373. Find the function of the form
  374.      (a + b x + c xç)/(1 + c x + d xç)
  375. that has order of contact 4 with eû at {0,1}.
  376. Plot this function and eû on the same axes for -2 ² x ² 2.
  377. :[font = special1; inactive; preserveAspect; ]
  378. Answer:
  379. :[font = smalltext; inactive; preserveAspect; ]
  380. The function we have to determine is:
  381. :[font = input; preserveAspect; ]
  382. Clear[x,f,a,b,c,d]
  383. y = (a + b x + c x^2)/(1 + d x + e x^2) 
  384. :[font = smalltext; inactive; preserveAspect; ]
  385. The conditions that must be met are:
  386. :[font = input; preserveAspect; ]
  387. eqn1 = (y/.x->0) == E^x/.x->0
  388. :[font = input; preserveAspect; ]
  389. eqn2 = (D[y,x]/.x->0) == D[E^x,x]/.x->0
  390. :[font = input; preserveAspect; ]
  391. eqn3 = (D[y,{x,2}]/.x->0) == D[E^x,{x,2}]/.x->0
  392. :[font = input; preserveAspect; ]
  393. eqn4 = (D[y,{x,3}]/.x->0) == D[E^x,{x,3}]/.x->0
  394. :[font = input; preserveAspect; ]
  395. eqn5 = (D[y,{x,4}]/.x->0) == D[E^x,{x,4}]/.x->0
  396. :[font = smalltext; inactive; preserveAspect; ]
  397. Now we nail down the coefficients:
  398. :[font = input; preserveAspect; ]
  399. coeffs = Solve[{eqn1,eqn2,eqn3,eqn4,eqn5}]
  400. :[font = smalltext; inactive; preserveAspect; ]
  401. Substitute in the values of the coefficients that do the job:
  402. :[font = input; preserveAspect; ]
  403. goody = y/.coeffs[[1]]
  404. :[font = smalltext; inactive; preserveAspect; ]
  405. And now the plot:
  406. :[font = input; preserveAspect; ]
  407. Plot[{E^x,goody},{x,-2,2}];
  408. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  409. Cohabitation.
  410. :[font = subsubsection; inactive; preserveAspect; ]
  411. T.1.b.ii)
  412. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  413. If you use your answer to part b.i) to calculate values of eû for -1 ² x ² 1, then how many accurate decimals of eû do you get?
  414. :[font = special1; inactive; preserveAspect; ]
  415. Answer:
  416. :[font = input; preserveAspect; ]
  417. Plot[Abs[goody - E^x],{x,-1,1},PlotRange->All];
  418. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  419. You get at least two accurate decimals of eû.
  420. :[font = subsubsection; inactive; preserveAspect; ]
  421. T.1.b.iii)
  422. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  423. If you use your answer to part ii) to calculate values of eû for -Ң堲 x ² Ò¢å, then how many accurate decimals of eû do you get?
  424. :[font = special1; inactive; preserveAspect; ]
  425. Answer:
  426. :[font = input; preserveAspect; ]
  427. Plot[Abs[goody - E^x],{x,-1/4,1/4},PlotRange->All];
  428. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  429. You get at least five accurate decimals of eû.
  430. Not bad.
  431. :[font = subsubsection; inactive; preserveAspect; ]
  432. T.1.c.i)
  433. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  434. Find the function of the form
  435.      a + b Cos[x] + c Sin[x] + d Cos[2 x] + e Sin[2 x]
  436. that has order of contact 4 with eû at {0,1}.
  437. Plot this function and eû on the same axes for -2 ² x ² 2.
  438. :[font = special1; inactive; preserveAspect; ]
  439. Answer:
  440. :[font = smalltext; inactive; preserveAspect; ]
  441. The function we have to determine is:
  442. :[font = input; preserveAspect; ]
  443. Clear[x,f,a,b,c,d]
  444. y = a + b Cos[x] + c Sin[x] + d Cos[2 x] + e Sin[2 x] 
  445. :[font = smalltext; inactive; preserveAspect; ]
  446. The conditions that must be met are:
  447. :[font = input; preserveAspect; ]
  448. eqn1 = (y/.x->0) == E^x/.x->0
  449. :[font = input; preserveAspect; ]
  450. eqn2 = (D[y,x]/.x->0) == D[E^x,x]/.x->0
  451. :[font = input; preserveAspect; ]
  452. eqn3 = (D[y,{x,2}]/.x->0) == D[E^x,{x,2}]/.x->0
  453. :[font = input; preserveAspect; ]
  454. eqn4 = (D[y,{x,3}]/.x->0) == D[E^x,{x,3}]/.x->0
  455. :[font = input; preserveAspect; ]
  456. eqn5 = (D[y,{x,4}]/.x->0) == D[E^x,{x,4}]/.x->0
  457. :[font = smalltext; inactive; preserveAspect; ]
  458. Now we nail down the coefficients:
  459. :[font = input; preserveAspect; ]
  460. coeffs = Solve[{eqn1,eqn2,eqn3,eqn4,eqn5}]
  461. :[font = smalltext; inactive; preserveAspect; ]
  462. Substitute in the values of the coefficients that do the job:
  463. :[font = input; preserveAspect; ]
  464. goody = y/.coeffs[[1]]
  465. :[font = smalltext; inactive; preserveAspect; ]
  466. And now the plot:
  467. :[font = input; preserveAspect; ]
  468. Plot[{E^x,goody},{x,-2,2}];
  469. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  470. There's a lot shared ink for -1 ² x ² 1.
  471. Isn't it amazing that sine and cosine waves can be combined in such a non-wavy fashion?
  472. :[font = subsubsection; inactive; preserveAspect; ]
  473. T.1.c.ii)
  474. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  475. If you use your answer to part c.i) to calculate values of eû for -¢Òå ² x ² ¢Òå, then how many accurate decimals of eû do you get?
  476. :[font = special1; inactive; preserveAspect; ]
  477. Answer:
  478. :[font = input; preserveAspect; ]
  479. Plot[Abs[goody - E^x],{x,-1/4,1/4},PlotRange->All];
  480. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ]
  481. You get at least three accurate decimals of eû.
  482. Maybe sines and cosines are good for something other than boring old trigonometry.
  483. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  484. T.2)  Natural cubic spline interpolation.
  485. :[font = subsubsection; inactive; preserveAspect; ]
  486. T.2.a.i)
  487. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  488. Try to pass a reasonable curve through the points 
  489.      {{-8, -12}, {-1, -15}, {2, 20}, {5, -4},
  490.      {8, 9}, {11, 3}, {15, 9}}.
  491. :[font = special1; inactive; preserveAspect; ]
  492. Answer:
  493. :[font = smalltext; inactive; preserveAspect; ]
  494. There are seven points in this list.  One common belief is that we should pass the unique 6th degree interpolating polynomial through the points and then plot it:
  495. :[font = input; preserveAspect; ]
  496. points = 
  497. {{-8,-12},{-1,-15},{2,20},{5,-4},{8,9},{11,3},{15,9}}
  498. :[font = smalltext; inactive; preserveAspect; ]
  499. The equation of this polynomial is:
  500. :[font = input; preserveAspect; ]
  501. Clear[x,y]
  502. y = InterpolatingPolynomial[points,x] 
  503. :[font = smalltext; inactive; preserveAspect; ]
  504. Here comes the plot:
  505. :[font = input; preserveAspect; ]
  506. givenpoints = 
  507. ListPlot[points,
  508. PlotStyle->{RGBColor[1,0,0],PointSize[.02]},
  509. DisplayFunction->Identity];
  510. polythrough = 
  511. Plot[y,{x,-8,15},DisplayFunction->Identity];
  512.     
  513. Show[givenpoints,polythrough,
  514. AxesLabel->{"x","y"},
  515. DisplayFunction->$DisplayFunction];
  516. :[font = smalltext; inactive; preserveAspect; ]
  517. Dammit get real!
  518. Look at that huge dip on the left! 
  519. That polynomial curve has dips and crests that are not suggested by the given points.  We better give up on using this approach for this list of numbers.
  520. A drastic measure would be to connect the consecutive points with line segments.  Some folks call this procedure "linear interpolation." Let's try it:
  521. :[font = input; preserveAspect; ]
  522. sticks = 
  523. ListPlot[points,PlotJoined->True,
  524. DisplayFunction->Identity];
  525.  
  526. Show[givenpoints,sticks,AxesLabel->{"x","y"},
  527. DisplayFunction->$DisplayFunction];
  528. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  529. Yuk!  This is rough, but it is more satisfactory than the polynomial plot.
  530. But there must be a way of getting some smoothness into the curve.
  531. :[font = subsubsection; inactive; preserveAspect; ]
  532. T.2.a.ii)
  533. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  534. What is a good way of getting smoothness into this?
  535. :[font = special1; inactive; preserveAspect; ]
  536. Answer:
  537. :[font = smalltext; inactive; preserveAspect; ]
  538. "Freedom is everyone, but using it wisely is the burden of the educated person."
  539.                                                                                            Argentine proverb.
  540. :[font = smalltext; inactive; preserveAspect; ]
  541. Instead of passing a line segment through consecutive points, we pass a different cubic curve through pair of consecutive points and make a smooth spline with knots at each of the points.
  542. This may seem outlandish at first, because a cubic curve 
  543.      y= a xè + b xç + c x + d
  544. has four coefficients to determine and normally we fit a cubic through four points.  We are going to fit the cubic through just two consecutive points and use the extra freedom we have to guarantee smoothness at the knots on the left and right of the knot.
  545. Start out with the points above
  546.      {x[1], y[1]}, {x[2], y[2]}, {x[3], y[3]}, 
  547.      {x[4], y[4]}, {x[5], y[5]},{x[6], y[6]}, {x[7], y[7]}
  548. sorted so that the x[k]'s increase as k increases.
  549. :[font = input; preserveAspect; ]
  550. Clear[f,x,y,a,b,c,d,k,eqn]
  551. :[font = smalltext; inactive; preserveAspect; ]
  552. f[k,x] is the cubic that we are going to run from
  553.      {x[k], y[k]} to {x[k+1], y[k +1]}:
  554. :[font = input; preserveAspect; ]
  555. f[k_,x_] = a[k] x^3 + b[k] x^2 + c[k] x + d[k]
  556. :[font = smalltext; inactive; preserveAspect; ]
  557. Here k runs from k = 1 to k = 6; so we are working with 6 cubics and each cubic has 4 undetermined (so far) coefficients.  This means we have 24 equations to play with.
  558. To hit the points, we want:
  559.      f[k, x[k]] = y[k] for k = 1, 2, 3, 4, 5, 6
  560. and
  561.      f[k, x[k+1]] = y[k+1] for k = 1, 2, 3, 4, 5, 6.
  562. For smoothness at the knots, we want:
  563.      f'[ k, x[k] = f'[ k-1, x[k]] for k = 2, 3, 4, 5, 6
  564.  and
  565.      f''[ k, x[k]] = f''[ k-1, x[k]] for k = 2, 3, 4, 5, 6
  566.  Here all derivatives are with respect to the x variable.
  567. We cannot use k = 1 in the last two equations because there is no function f[0, x].
  568. So far we have specified
  569.      6 + 6 + 5 + 5 = 22 
  570. conditions and we have 24 undetermined coefficients; as a result we need to specify two more conditions.
  571. Old timers at the art of curve fitting have found that good results usually come from specifying that the second derivatives be 0 at the end points {x[1], y[1]} and {x[7], y[7]}.  They call the resulting spline "the natural cubic spline."
  572. Here is the Mathematica code that does all this.
  573. The specific rules we want Mathematica to follow are:
  574. :[font = input; preserveAspect; ]
  575. eqn[1,1] = (f[1,x[1]] == y[1])
  576. :[font = input; preserveAspect; ]
  577. eqn[2,1] = (f[1,x[2]] == y[2])
  578. :[font = input; preserveAspect; ]
  579. eqn[3,1] = (D[f[1,x],{x,2}]/.x->x[1]) == 0
  580. :[font = input; preserveAspect; ]
  581. eqn[4,1] = (D[f[6,x],{x,2}]/.x->x[7]) == 0
  582. :[font = smalltext; inactive; preserveAspect; ]
  583. The general rules we want Mathematica to use are below.
  584. These general rules will not override the specific rules above.
  585. :[font = input; preserveAspect; ]
  586. eqn[1,k_] = (f[k,x[k]] == y[k])
  587. :[font = input; preserveAspect; ]
  588. eqn[2,k_] = (f[k,x[k+1]] == y[k+1])
  589. :[font = input; preserveAspect; ]
  590. eqn[3,k_] = (D[f[k,x],x]/.x->x[k]) == (D[f[k-1,x],x]/.x->x[k] )
  591. :[font = input; preserveAspect; ]
  592. eqn[4,k_] = (D[f[k,x],{x,2}]/.x->x[k]) == (D[f[k-1,x],{x,2}]/.x->x[k])
  593. :[font = text; inactive; preserveAspect; ]
  594. Now get ready to plug the points in:
  595. :[font = input; preserveAspect; ]
  596. Clear[points]
  597. :[font = input; preserveAspect; ]
  598. x[k_] := points[[k,1]]
  599. :[font = input; preserveAspect; ]
  600. y[k_] := points[[k,2]]
  601. :[font = smalltext; inactive; preserveAspect; ]
  602. Enter the seven points sorted in order of increasing x-coordinates:
  603. :[font = input; preserveAspect; ]
  604. points = 
  605. {{-8,-12},{-1,-15},{2,20},{5,-4},{8,9},{11,3},{15,9}}
  606. :[font = smalltext; inactive; preserveAspect; ]
  607. Check for instance:
  608. :[font = input; preserveAspect; ]
  609. {x[2],y[2]}
  610. :[font = smalltext; inactive; preserveAspect; ]
  611. Good.
  612. Now solve for the correct coefficients - all 24 of them- substitute and plot:
  613. :[font = input; preserveAspect; ]
  614. coeffs =
  615. Solve[Flatten[Table[{eqn[1,k],eqn[2,k],eqn[3,k],eqn[4,k]},{k,1,6}]]]
  616. :[font = input; preserveAspect; ]
  617. Clear[ourf]
  618. Table[{"ourf"[k,x],ourf[k,x_] = (f[k,x]/.coeffs[[1]])},{k,1,6}]
  619.  
  620. plot1 =
  621. Plot[ourf[1,x],{x,x[1],x[2]},DisplayFunction->Identity];
  622.  
  623. plot2 =
  624. Plot[ourf[2,x],{x,x[2],x[3]},DisplayFunction->Identity];
  625.  
  626. plot3 =
  627. Plot[ourf[3,x],{x,x[3],x[4]},DisplayFunction->Identity];
  628.  
  629. plot4 =
  630. Plot[ourf[4,x],{x,x[4],x[5]},DisplayFunction->Identity];
  631.  
  632. plot5 =
  633. Plot[ourf[5,x],{x,x[5],x[6]},DisplayFunction->Identity];
  634.  
  635. plot6 =
  636. Plot[ourf[6,x],{x,x[6],x[7]},DisplayFunction->Identity];
  637. :[font = text; inactive; preserveAspect; ]
  638. By gosh, that's just about the way that we would have connected the dots with a pencil.  The old-time cubic spliners seem to know what they're talking about.  And to add adventure to an already thrilling subject, show on the same plot both the interpolating polynomial and the natural spline.
  639. :[font = input; preserveAspect; ]
  640. Show[plot1,plot2,plot3,plot4,plot5,plot6,givenpoints,polythrough,
  641. PlotRange->All,
  642. AxesLabel->{"x","y"},
  643. DisplayFunction->$DisplayFunction];
  644. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ]
  645. Sit back and reflect remembering that you are one of a elite group of calculus students who has ever seen a cubic spline.
  646. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  647. T.3)  Landing an airplane
  648. :[font = text; inactive; preserveAspect; ]
  649. The design of an elecronically-controlled airplane landing system calls for the plane to approach the runway head-on, at a constant horizontal speed s and constant altitude h.  As the plane passes over a certain point on the ground R units from the designated touch-down spot on the runway, the system is to take over and bring the plane onto the runway on the trajectory of a cubic polynomial.
  650. The constant horizontal speed s is to be maintained through the whole landing procedure.
  651. Our units will be distances x and y in feet and time t in seconds.
  652. Set up the cubic:
  653. :[font = input; preserveAspect; ]
  654. y = a x^3 + b x^2 + c x + d
  655. :[font = text; inactive; preserveAspect; ]
  656. Here y stands for the altitude of the plane when the plane is directly above a spot on the ground x feet from the designated touch-down spot on the runway.  For a smooth onset of the descent we must have:
  657. :[font = input; preserveAspect; ]
  658. eqn1 = (y/.x->R) == h
  659. :[font = input; preserveAspect; ]
  660. eqn2 = (D[y,x]/.x->R) == 0 
  661. :[font = text; inactive; preserveAspect; ]
  662. For touchdown at the designated touch-down spot on the runway, we must have:
  663. :[font = input; preserveAspect; ]
  664. eqn3 =(y/.x->0) == 0
  665. :[font = text; inactive; preserveAspect; ]
  666. The runway must be tangent to the trajectory at the designated touch-down spot on the runway, so we must have: 
  667. :[font = input; preserveAspect; ]
  668. eqn4 = (D[y,x]/.x->0)== 0 
  669. :[font = text; inactive; preserveAspect; ]
  670. To determine the trajectory, we solve:
  671. :[font = input; preserveAspect; ]
  672. coeffs = Solve[{eqn1,eqn2,eqn3,eqn4},{a,b,c,d}]
  673. :[font = text; inactive; preserveAspect; ]
  674. The trajectory is the graph of:
  675. :[font = input; preserveAspect; ]
  676. trajectory = y/.coeffs[[1]]
  677. :[font = subsubsection; inactive; preserveAspect; ]
  678. T.3.a)
  679. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  680. Plot the trajectory for the case R = 10000 ft, h = 5000 ft.
  681. Then plot the detail of the landing.
  682. :[font = special1; inactive; preserveAspect; ]
  683. Answer:
  684. :[font = smalltext; inactive; preserveAspect; ]
  685. The plot of the landing trajectory is:
  686. :[font = input; preserveAspect; ]
  687. landing = 
  688. Plot[trajectory/.{R->10000,h->5000},{x,0,10000},
  689. PlotStyle->RGBColor[0,0,1]];
  690. :[font = smalltext; inactive; preserveAspect; ]
  691. Here is a plot showing the plane's path slightly before the descent begins and slightly after the plane touches down:
  692. :[font = input; preserveAspect; ]
  693. air =
  694.     Plot[5000,{x,10000,14000},PlotStyle->RGBColor[0,0,1],
  695.     DisplayFunction->Identity];
  696. land = 
  697.     Plot[0,{x,-1000,0},PlotStyle->RGBColor[0,0,1], 
  698.     DisplayFunction->Identity];
  699.     
  700. Show[air,landing,land,AspectRatio->Automatic,
  701.     DisplayFunction->$DisplayFunction];
  702. :[font = smalltext; inactive; preserveAspect; ]
  703. Nice.
  704. Here is a plot of the detail of the landing in true scale:
  705. :[font = input; preserveAspect; ]
  706. Show[air,landing,land,
  707.     AspectRatio->Automatic,
  708.     PlotRange->{{-500,1000},{-10,400}},
  709.     DisplayFunction->$DisplayFunction];
  710. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  711. The whole path of the airplane is nothing but a smooth spline knotted at {0,0} and {10000, 5000}.
  712. :[font = subsubsection; inactive; preserveAspect; ]
  713. T.3.b)
  714. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  715. We show our system to a knowledgable aviator for comment.  The aviator is skeptical about it because (among other issues) there is no safeguard against destructive forces.  In order to hold the plane together, the vertical acceleration must be held to be less than 3.2 ft/sec per sec.  Compute the vertical acceleration as a function of the constant horizontal s, R, h and t.
  716. Give the relationship R, s and h must have in order to stay within the safety guideline.
  717. :[font = special1; inactive; preserveAspect; ]
  718. Answer:
  719. :[font = smalltext; inactive; preserveAspect; ]
  720. We know that the plane is travelling at a constant horizontal speed of s ÒòÒ§ÒîÒ«îÒÍð.  We also know the trajectory:
  721. :[font = input; preserveAspect; ]
  722. trajectory
  723. :[font = smalltext; inactive; preserveAspect; ]
  724. Because the plane is holding a steady horizontal speed of s mph, we also know that as a function of t,
  725.      x = R - s t; 
  726. so we can get vertical altitude y (in feet) as a function of t: 
  727. :[font = input; preserveAspect; ]
  728. vertalt = trajectory/.x->(R - s t)
  729. :[font = smalltext; inactive; preserveAspect; ]
  730. The vertical speed in feet per second is:
  731. :[font = input; preserveAspect; ]
  732. vertspeed = D[vertalt,t]
  733. :[font = smalltext; inactive; preserveAspect; ]
  734. The vertical acceleration feet per second per second is:
  735. :[font = input; preserveAspect; ]
  736. vertaccel = Together[D[vertspeed,t]]
  737.  
  738. :[font = smalltext; inactive; preserveAspect; ]
  739. From this we can see that the acceleration starts out at
  740. :[font = input; preserveAspect; ]
  741. vertaccel/.t->0
  742. :[font = smalltext; inactive; preserveAspect; ]
  743. (pointing down) and steadily increases as t increases until the time at which the plane touches down; this time is given by R - s t = 0 or t = R/s, so the vertical acceleration at touchdown is
  744. :[font = input; preserveAspect; ]
  745. vertaccel/.t->R/s
  746. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  747. (pointing up).  Thus to meet the safety guideline, we can get by with
  748.      6 h sç/ Rç ² 3.2.
  749. :[font = subsubsection; inactive; preserveAspect; ]
  750. T.3.c) 
  751. :[font = text; inactive; preserveAspect; ]
  752. If the horizontal speed s is 150 mph and the original altitude h is 5000 ft, find the mininum value safe value of R.  Plot the trajectory for this R.
  753. (Remember that the plane begins to land as it passes over a certain point on the ground R units from the designated touch-down spot.)
  754. :[font = special1; inactive; preserveAspect; ]
  755. Answer:
  756. :[font = smalltext; inactive; preserveAspect; ]
  757. The speed 150 mph translates into s = 150 Ò£êÒ⁄çÒ…¡Ò…í feet per second.
  758. The minimum R is given by:
  759. :[font = input; preserveAspect; ]
  760. Clear[h,s,R]
  761. Solve[((6 h s^2/R^2)/.{h->5000,s->150}) == 3.2,R] 
  762. :[font = smalltext; inactive; Cclosed; preserveAspect; startGroup; ]
  763. In miles this is:
  764. :[font = input; preserveAspect; endGroup; ]
  765. 14523.7 / 5280
  766. :[font = smalltext; inactive; preserveAspect; ]
  767. Here is the plot:
  768. :[font = input; preserveAspect; ]
  769. Plot[trajectory/.{h->5000,R->14523.7},{x,0,14523.7},
  770. AspectRatio->Automatic,
  771. Ticks->{Range[0,15000,5000],Automatic}];
  772. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ]
  773. How beautiful to fly.
  774. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  775. Give it a try
  776. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  777. G.1)  Approximation of ArcSin[x] with an unlikely function.
  778. :[font = subsubsection; inactive; preserveAspect; ]
  779. G.1.a.i)
  780. :[font = text; inactive; preserveAspect; ]
  781. Plot ArcSin[x] and 3 x/(2 + Î1ã ã-ã ãxãç) on the same axes for -1 ² x ² 1.
  782. :[font = subsubsection; inactive; preserveAspect; ]
  783. G.1.a.ii)
  784. :[font = text; inactive; preserveAspect; ]
  785. Plot the absolute value of the difference between 
  786.      ArcSin[x] and 3 x/(2 + Î1ã ã-ã ãxãç)
  787. for -.5 ² x ² .5.
  788. If -.5 ² x ² .5, then how many accurate decimals do you get by using the value 3 x/(2 + Î1ã ã-ã ãxãç) in place of the actual value of ArcSin[x]? 
  789. :[font = subsubsection; inactive; preserveAspect; ]
  790. G.1.a.iii)
  791. :[font = text; inactive; preserveAspect; endGroup; ]
  792. What explanation do you offer for the similarity of the plots of these two functions?
  793. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  794. G.2)  Making your own remarkable plots and approximations: Taylor's polynomials.
  795. :[font = subsubsection; inactive; preserveAspect; ]
  796. G.2.a.i)
  797. :[font = text; inactive; preserveAspect; ]
  798. Find the third degree polynomial that has order of contact 3 with Sin[x] at {0,0}.
  799. Plot your polynomial and Sin[x] on the same axes for -` ² x ² `.
  800. :[font = subsubsection; inactive; preserveAspect; ]
  801. G.2.a.ii)
  802. :[font = text; inactive; preserveAspect; ]
  803. Find the fifth degree polynomial that has order of contact 5 with Sin[x] at {0,0}.
  804. Plot your polynomial and Sin[x] on the same axes for -` ² x ² `.
  805. :[font = subsubsection; inactive; preserveAspect; ]
  806. G.2.a.iii)
  807. :[font = text; inactive; preserveAspect; ]
  808. Find the seventh degree polynomial that has order of contact 7 with Sin[x] at {0,0}.
  809. Plot your polynomial and Sin[x] on the same axes for -2` ² x ² 2`.
  810. :[font = subsubsection; inactive; preserveAspect; ]
  811. G.2.a.iv)
  812. :[font = text; inactive; preserveAspect; ]
  813. Find the eleventh degree polynomial that has order of contact 11 with Sin[x] at {0,0}.
  814. Plot your polynomial and Sin[x] on the same axes for -2` ² x ² 2`.
  815. :[font = subsubsection; inactive; preserveAspect; ]
  816. G.2.a.v)
  817. :[font = text; inactive; preserveAspect; ]
  818. You are programming a calculator that is being built to deliver seven decimal accuracy.  This calculator can only add, subtract, multiply and divide numbers.  What polynomial would you program in to stand for Sin[x] for -` ²˚ x ² `?
  819. :[font = subsubsection; inactive; preserveAspect; ]
  820. G.2.b.i)
  821. :[font = text; inactive; preserveAspect; ]
  822. Find the fourth degree polynomial that has order of contact 4 with Cos[x] at {0,1}.
  823. Plot your polynomial and Cos[x] on the same axes for -` ² x ² `.
  824. :[font = subsubsection; inactive; preserveAspect; ]
  825. G.2.b.i)
  826. :[font = text; inactive; preserveAspect; ]
  827. Find the eighth degree polynomial that has order of contact 8 with Cos[x] at {0,1}.
  828. Plot your polynomial and Cos[x] on the same axes for -` ² x ² `.
  829. :[font = subsubsection; inactive; preserveAspect; ]
  830. G.2.b.iii)
  831. :[font = text; inactive; preserveAspect; ]
  832. You are programming a calculator that is being built to deliver seven decimal accuracy.  This calculator can only add, subtract, multiply and divide numbers.  What polynomial would you program in to stand for Cos[x] for -` ²˚ x ² `?
  833. :[font = subsubsection; inactive; preserveAspect; ]
  834. G.2.c)
  835. :[font = text; inactive; preserveAspect; endGroup; ]
  836. You are programming a calculator that is being built to deliver seven decimal accuracy.  This calculator can only add, subtract, multiply and divide numbers.  What polynomial would you program in to stand for eû for -1 ² x ² 1?
  837. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  838. G.3)  Making your own remarkable plots and approximations - Pade's quotients of polynomials.
  839. :[font = subsubsection; inactive; preserveAspect; ]
  840. G.3.a.i)
  841. :[font = text; inactive; preserveAspect; ]
  842. Find the function of the form
  843.      (a + b x + c xç)/(1 + d x + e xç)
  844. that has order of contact 4 with Log[1 + x] at {0,1}.
  845. Plot this function and Log[1 + x] on the same axes for -1 ² x ² 1.
  846. :[font = subsubsection; inactive; preserveAspect; ]
  847. G.3.a.ii)
  848. :[font = text; inactive; preserveAspect; ]
  849. If 0 ² x ² .5, then how many accurate decimals do you get by using the value of your answer to part i) in place of the actual value of 
  850. Log[1 + x]? 
  851. :[font = subsubsection; inactive; preserveAspect; ]
  852. G.3.b.i)
  853. :[font = text; inactive; preserveAspect; ]
  854. Find the function of the form
  855.      (a + b xç + c xë)/(1 + d xç + e xë)
  856. that has order of contact 4 with Cos[x] at {0,1}.
  857. (Here we're using even powers of x because Cos[x] is an even function.)
  858. Plot this function and Cos[x] on the same axes for - 2` ² x ² 2 `.
  859. :[font = subsubsection; inactive; preserveAspect; ]
  860. G.3.b.ii)
  861. :[font = text; inactive; preserveAspect; ]
  862. If -“Òä ² x ² “Òä then how many accurate decimals do you get by using the value of your answer to part i) in place of the actual value of Cos[x]?
  863. :[font = subsubsection; inactive; preserveAspect; ]
  864. G.3.b.iii)
  865. :[font = text; inactive; preserveAspect; endGroup; ]
  866. What would you do to try for more accuracy?
  867. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  868. G.4)  Making your own remarkable plots and approximations - Fourier's sine and cosine waves.
  869. :[font = text; inactive; preserveAspect; ]
  870. Fourier had the idea that all functions defined on [-`,`] can be built from Sine and Cosine waves the same way that all music can be built from basic harmonics.
  871. Here is one way to try out Fourier's idea:
  872. :[font = subsubsection; inactive; preserveAspect; ]
  873. G.4.a)
  874. :[font = text; inactive; preserveAspect; ]
  875. Find the function of the form
  876. a + b Cos[x] + c Sin[x] + d Cos[2 x] + e Sin[2 x]
  877. that has order of contact 4 with ArcTan[x] at {0,0}.
  878. Plot this function and ArcTan[x] on the same axes for -` ² x ² `.
  879. :[font = subsubsection; inactive; preserveAspect; ]
  880. G.4.b)
  881. :[font = text; inactive; preserveAspect; endGroup; ]
  882. Find the function of the form
  883. a + b Cos[x] + c Sin[x] + d Cos[2 x] + e Sin[2 x] + f Cos[3x} + g Sin[3x]
  884. that has order of contact 6 with ArcTan[x] at {0,0}.
  885. Plot this function and ArcTan[x] on the same axes for-` ² x ² `.
  886. How many accurate decimals of ArcTan[x] does your answer give for -1 ² x ² 1?
  887. What do you think of Fourier's idea?
  888. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  889. G.5)  Service areas on the interstate.
  890. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  891. Design an access road that will take cars off a straight interstate highway onto a Ò¢å mile long straight stretch parallel to the highway running ¥Òå mile from the highway and then bring cars back onto the highway.
  892. Plot your design and the highway.
  893. :[font = special1; inactive; preserveAspect; ]
  894. Tip:
  895. :[font = smalltext; inactive; preserveAspect; endGroup; endGroup; ]
  896. Cubic splines look good.
  897. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  898. G.6)  A better landing.
  899. :[font = text; inactive; preserveAspect; ]
  900. This problem refers to Tutorial problem (T.3) (Landing an airplane.)
  901. Our aviator friend had another comment about our electronic landing system.
  902. In the system proposed in Tutorial, there is an implicit jump in the vertical acceleration when x = 0 and x = R.  This jump can cause a rather unpleasant jerk similar to the jerk you sometimes feel as a car stops.  A way of trying to eliminate it is to make sure that the second derivative
  903.      D[y, {x, 2}] = 0 for x = 0 and x = R.
  904. :[font = subsubsection; inactive; preserveAspect; ]
  905. G.6.a.i)
  906. :[font = text; inactive; preserveAspect; ]
  907. Modify the approach in Tutorial (T.6) to bring the plane onto the runway on the trajectory of a quintic (5th degree) polynomial with 
  908. D[y, {x, 2}] = 0 for x = 0 and x = R.  For this part, do not worry about the size of the vertical acceleration.
  909. :[font = subsubsection; inactive; preserveAspect; ]
  910. G.6.a.ii)
  911. :[font = text; inactive; preserveAspect; ]
  912. What can you do to try for even more smoothness at x = 0 and x = R?
  913. :[font = subsubsection; inactive; preserveAspect; ]
  914. G.6.b) 
  915. :[font = text; inactive; preserveAspect; ]
  916. Plot the quintic trajectory for the case R = 10,000 ft, h = 5000 ft.  Then plot the detail of the landing.
  917. :[font = subsubsection; inactive; preserveAspect; ]
  918. G.6.c)
  919. :[font = text; inactive; preserveAspect; endGroup; ]
  920. If the horizontal speed is 150 mph and the original altitude h is 5000 ft, estimate the mininum value safe value of R for the quintic trajectory.
  921. Plot the quintic trajectory for this R.
  922. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  923. G.7)  Cubic Spines.
  924. :[font = subsubsection; inactive; preserveAspect; ]
  925. G.7.a)
  926. :[font = text; inactive; preserveAspect; ]
  927. Pass the interpolating polynomial and pass the natural cubic spline through the following data points:
  928. :[font = text; inactive; preserveAspect; ]
  929.      {{0.2, 0.9}, {0.4, 1.8}, {0.6, 4.6}, 
  930.      {0.8, 10.8}, {1., 5.}, {1.2, 2.6}, 
  931.      {1.4, 2.1}, {1.6, 2.}, {1.8, 2.1}} 
  932. :[font = text; inactive; preserveAspect; ]
  933. Plot the polynomial and the spline on separate plots and discuss the virtues of each.
  934. :[font = subsubsection; inactive; preserveAspect; ]
  935. G.7.b)
  936. :[font = text; inactive; preserveAspect; ]
  937. Take nine equally spaced points x[1], x[2],. . ., x[9] in [-4,4] with x[1] = -4 and x[9] = 4.
  938. Pass the interpolating polynomial and pass the natural cubic spline through the points:
  939.      { x[ k ],1/(1 + 16 x[ k ]ç)}, k = 1, 2, . . . ,9.
  940. Plot the polynomial and points and then plot the spline and the points on separate plots and discuss the virtues of each.
  941. :[font = subsubsection; inactive; preserveAspect; ]
  942. G.7.c)
  943. :[font = smalltext; inactive; preserveAspect; endGroup; ]
  944. Take the points 
  945.             {{-8, -12},{-1, -15},{2, 20},{5, -4},{8, 9},{11,3}, {15, 9}} 
  946. from T.2) above.  Pass a cubic spline through them in the manner of T.2) but this time see hat happens when, instead of specifying that the second derivatives be 0 at the end points, you specify the the values to be other numbers.  Try positive numbers, negative numbers or mixtures.  Can you improve on the plot from T.2)? 
  947. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  948. G.8)  Kissing parabolas.
  949. :[font = subsubsection; inactive; preserveAspect; ]
  950. G.8.a.i)
  951. :[font = text; inactive; preserveAspect; ]
  952. Take f[x] = x e±ûÄ and plot on the same axes f[x] and the quadratic (2nd degree) polynomial that has order of contact 2 with f[x] at the point {-1, f[-1]}.
  953. :[font = subsubsection; inactive; preserveAspect; ]
  954. G.8.a.ii)
  955. :[font = text; inactive; preserveAspect; ]
  956. Take f[x] = x e±ûÄ and plot all on the same axes f[x] and the quadratic (2nd degree) polynomials that have degree of contact 2 with f[x] at the points 
  957.      {-2, f[-2]}, {-1, f[-1]},{1, f[1]}, and {2, f[2]}.
  958. :[font = smalltext; inactive; preserveAspect; ]
  959. G.8.b.ii)
  960. Take f[x] = Cos[x] and plot all on the same axes f[x] and the quadratic (2nd degree) polynomials that have degree of contact 2 with f[x] at the points 
  961.      {-2, f[-2]}, {-1, f[-1]}, {0, f[0]}{1, f[1]}, 
  962.      and {2, f[2]}.
  963. :[font = subsubsection; inactive; preserveAspect; ]
  964. G.8.c.i)
  965. :[font = text; inactive; preserveAspect; ]
  966. If the plot of quadratic with degree of contact 2 with f[x] at {a, f[a]} opens up, do you expect the tangent line to the graph of f[x] at {a, f[a]} to lie above or below the curve in the vicinity of {a, f[a]}? Illustrate with a plot.
  967. :[font = subsubsection; inactive; preserveAspect; ]
  968. G.8.c.ii)
  969. :[font = text; inactive; preserveAspect; endGroup; ]
  970. How does the sign of f''[a] influence which direction (up or down) that the plot of quadratic with degree of contact 2 with f[x] at {a, f[a]} opens?
  971. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  972. G.9) Changing the variable to improve the order of contact at 0.
  973. :[font = subsubsection; inactive; preserveAspect; ]
  974. G.9.a.i)
  975. :[font = text; inactive; preserveAspect; ]
  976. Let f[x] = eû and
  977. let g[x] =1 + x + xç/2 + xè/3! + xé/4! + xê/5! + xë/6!.
  978. What is the order of contact of f[x] and g[x] at {0,1}?
  979. :[font = subsubsection; inactive; preserveAspect; ]
  980. G.9.a.ii)
  981. :[font = text; inactive; preserveAspect; ]
  982. Let f[x] = eû and
  983. let g[x] =1 + x + xç/2 + xè/3! + xé/4! + xê/5! + xë/6!.
  984. What is the order of contact of f[xç] and g[xç] at {0,1}?
  985. :[font = subsubsection; inactive; preserveAspect; ]
  986. G.9.a.iii)
  987. :[font = text; inactive; preserveAspect; ]
  988. Let f[x] = eû and
  989. let g[x] =1 + x + xç/2 + xè/3! + xé/4! + xê/5! + xë/6!.
  990. What is the order of contact of f[xè] and g[xè] at {0,1}?
  991. :[font = subsubsection; inactive; preserveAspect; ]
  992. G.9.b.i)
  993. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  994. If f[x] and g[x] is any pair of functions that have order of contact n at {0, f[0]} = {0, g[0]}, then what is the order of contact of f[xç] and g[xç] at {0, f[0]} = {0, g[0]}?
  995. :[font = special1; inactive; preserveAspect; ]
  996. Tip:
  997. :[font = input; preserveAspect; ]
  998. Clear[f,g,x,k,n,derivorder]
  999. :[font = smalltext; inactive; preserveAspect; ]
  1000. Fill in a value of n and play with:
  1001. :[font = input; preserveAspect; ]
  1002. n = 3
  1003. :[font = input; preserveAspect; endGroup; ]
  1004. ColumnForm[Table[{derivorder[k],D[f[x^2],{x,k}],
  1005. D[g[x^2],{x,k}]},{k,1,2 n}]/.x->0]
  1006. :[font = subsubsection; inactive; preserveAspect; ]
  1007. G.9.b.ii)
  1008. :[font = text; inactive; preserveAspect; ]
  1009. If f[x] and g[x] is any pair of functions that have order of contact n at {0, f[0]} = {0, g[0]}, then what is the order of contact of f[xè] and g[xè] at {0, f[0]} = {0, g[0]}?
  1010. :[font = subsubsection; inactive; preserveAspect; ]
  1011. G.9.b.iii)
  1012. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  1013. If p is any positive integer and f[x] and g[x] is any pair of functions that have order of contact n at {0, f[0]} = {0, g[0]}, then what is the order of contact of f[x‚] and g[x‚] at {0, f[0]} = {0, g[0]}?
  1014. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  1015. Literacy Sheet
  1016. :[font = text; inactive; preserveAspect; ]
  1017. 1.  Fill the blank: 
  1018. The higher the order of contact of f[x] and g[x] at 0, then the more we can expect the plots of f[x] and g[x] on [-1,1] to be ——————————————————————.
  1019. :[font = text; inactive; preserveAspect; ]
  1020. 2.  What is the basic idea underlying the construction of smooth splines?
  1021. :[font = text; inactive; preserveAspect; ]
  1022. 3.  How smooth do you expect a spline of Cos[x] - 1 and x knotted at {0,0} to be?
  1023. :[font = text; inactive; preserveAspect; ]
  1024. 4.  How smooth do you expect a spline of Cos[x] - 1 and xç knotted at {0,0} to be?
  1025. :[font = text; inactive; preserveAspect; ]
  1026. 5.  Given a constant a, then how would you choose another constant k to try to make a spline of f[x] = Sin[a x] and g[x] = k x knotted at {0,0} as smooth as possible?
  1027. :[font = text; inactive; preserveAspect; ]
  1028. 6.  Why are some scientists suspicious of interpolating polynomials but not so suspicious of the natural cubic spline?
  1029. :[font = text; inactive; preserveAspect; ]
  1030. 7.  Describe the advantage of a cubic spline over a stick figure.
  1031. :[font = text; inactive; preserveAspect; ]
  1032. 8.  Computers and calculators must be programmed to add, subtract, multipy and divide.  All the other mathematical operations like takiing logarithms, taking e to a power, taking the Sine of an angle, etc. must be programmed in terms of additions, subtraction, multiplication and division.  How can you use the idea of order of contact to help to program these mathematical operations?
  1033. :[font = text; inactive; preserveAspect; ]
  1034. 9.  What was Fourier's idea?
  1035. :[font = text; inactive; preserveAspect; ]
  1036. 10.  Fix a positive integer n and give a formula for the nth derivative of xü.
  1037. :[font = text; inactive; preserveAspect; ]
  1038. 11.  Fix a positive integer n and give a formula for the nth derivative of eû.
  1039. :[font = text; inactive; preserveAspect; ]
  1040. 12.  Fix a positive integer n and give a formula for the nth derivative of e±û.
  1041. :[font = text; inactive; preserveAspect; endGroup; ]
  1042. 13.  Fix a positive integer n and decide whether the nth derivative of Sin[x] has the formula Sin[x + n “Òä].
  1043. This would amount to saying that each successive differentiation shifts the Sine curve by “Òä.  If this formula is right, then explain why you believe that it is right.  If the formula is wrong, then explain why you believe that its wrong.
  1044. ^*)